console.log("====================")
$("#editnonghangjfType").change(function (){
    var reslist=$("#editnonghangjfType").select2("data");
    $("#editnonghangjfTypes").val(payTypes(reslist));
});


$("#nonghangjfType").change(function(){
    var reslist=$("#nonghangjfType").select2("data");
    $("#nonghangjfTypes").val(payTypes(reslist));
});

function editnonghangjf(i) {
    $("#editnonghangjfCompanyPrivateKey").attr("name", "payCompanyInfos[" + i + "].nonghangjfVo.companyPrivateKey");
    $("#editnonghangjfCompanyPublicKey").attr("name", "payCompanyInfos[" + i + "].nonghangjfVo.companyPublicKey");
    $("#editnonghangjfMerchantId").attr("name", "payCompanyInfos[" + i + "].nonghangjfVo.merchantId");


    $("#editnonghangjfTypes").attr("name", "payCompanyInfos[" + i + "].payType");

    $("#editnonghangjfPayType").attr("data-placeholder", "请从列表选择一项");
    $("#editnonghangjfPayType").attr("required", "");


}

function nonghangjf(i) {
    $("#nonghangjfCompanyPrivateKey").attr("name", "payCompanyInfos[" + i + "].nonghangjfVo.companyPrivateKey");
    $("#nonghangjfCompanyPublicKey").attr("name", "payCompanyInfos[" + i + "].nonghangjfVo.companyPublicKey");
    $("#nonghangjfMerchantId").attr("name", "payCompanyInfos[" + i + "].nonghangjfVo.merchantId");



    $("#nonghangjfTypes").attr("name", "payCompanyInfos[" + i + "].payType");


    $("#nonghangjfPayType").attr("data-placeholder", "请从列表选择一项");
    $("#nonghangjfPayType").attr("required", "");


}